package com.ruoyi.business.service;

import com.ruoyi.business.Category;
import com.ruoyi.business.mapper.CategoryMapper;
import com.ruoyi.common.common.ResultBody;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * @author ：jiangguanjun
 * @description：品类
 * @date ：2020/7/16 21:13
 */
@Slf4j
@Component
public class CategoryService {

    @Autowired
    private CategoryMapper categoryMapper ;

    public ResultBody list(Integer cId, Integer type) {
        List<Category> categoryList = categoryMapper.selectByIdOrType(cId,type) ;
        return  ResultBody.success(categoryList) ;
    }
}
